From: Daniel van Vugt Date: Wed, 19 Aug 2020 11:22:51 +0000 (+0800) Subject: st-theme-node-drawing: Render all shadow sections with thickness > 0 X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~715 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5492309755b49203a13b23e2185387a009cf1aa7;p=gnome-shell.git st-theme-node-drawing: Render all shadow sections with thickness > 0 In some styles the top or left sections of box-shadows would go missing even though they had non-zero thickness. This was because the inner local coordinates could become very slightly negative and were then incorrectly judged to be invisible. Negative coordinates should not be ignored because that's where the entire top/left sections of shadow are meant to exist. It's only the sections of shadow with zero thickness that we should skip. Part-of: --- diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c index 1e00a06f3..64f2d7518 100644 --- a/src/st/st-theme-node-drawing.c +++ b/src/st/st-theme-node-drawing.c @@ -2103,9 +2103,9 @@ st_theme_node_paint_sliced_shadow (StThemeNodePaintState *state, idx = 0; - if (top > 0) + if (yoffset < top) { - if (left > 0) + if (xoffset < left) { /* Top left corner */ rectangles[idx++] = xoffset; @@ -2130,7 +2130,7 @@ st_theme_node_paint_sliced_shadow (StThemeNodePaintState *state, rectangles[idx++] = s_right; rectangles[idx++] = s_top; - if (right > 0) + if (xend > right) { /* Top right corner */ rectangles[idx++] = right; @@ -2145,7 +2145,7 @@ st_theme_node_paint_sliced_shadow (StThemeNodePaintState *state, } } - if (left > 0) + if (xoffset < left) { /* Left middle */ rectangles[idx++] = xoffset; @@ -2170,8 +2170,7 @@ st_theme_node_paint_sliced_shadow (StThemeNodePaintState *state, rectangles[idx++] = s_right; rectangles[idx++] = s_bottom; - - if (right > 0) + if (xend > right) { /* Right middle */ rectangles[idx++] = right; @@ -2185,9 +2184,9 @@ st_theme_node_paint_sliced_shadow (StThemeNodePaintState *state, rectangles[idx++] = s_bottom; } - if (bottom > 0) + if (yend > bottom) { - if (left > 0) + if (xoffset < left) { /* Bottom left corner */ rectangles[idx++] = xoffset; @@ -2212,7 +2211,7 @@ st_theme_node_paint_sliced_shadow (StThemeNodePaintState *state, rectangles[idx++] = s_right; rectangles[idx++] = 1; - if (right > 0) + if (xend > right) { /* Bottom right corner */ rectangles[idx++] = right;